<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="author" content="王劲翔">
    <title>Document</title>
</head>

<body>
    <script>
        function getLargeSum(arr, num) {
            return arr.reduce((sum, item) => item > num ? sum += item : sum, 0)
        }
        let arr3 = [4, 9, 6, 90, 3, 11]
        const num = 5
        let sum3 = getLargeSum(arr3, num)
        // console.log(`原数组为：${arr3}`);
        // console.log(`求得大于${num}的数的和为：${sum3}`);
    </script>
</body>

</html>